Rules for integrands of the form (((d Tan[e+f x]))^n) (((a+b Sec[e+f x]))^m)

1.  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when  ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)==0

1:  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when  ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)==0 ∧ n∈ℤ

Derivation: Integration by substitution

Basis: If ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)==0 ∧ n∈ℤ, then ((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)==-(1/((a^(m-n-1)) (b^n) d)) Subst[(((((a-b x))^((m-1)/2)) (((a+b x))^(((m-1)/2)+n)))/(x^(m+n))),x,Cos[c+d x]](∂_x)Cos[c+d x]

Rule: If ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)==0 ∧ n∈ℤ, then

∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  ⟶  -(1/((a^(m-n-1)) (b^n) d)) Subst[∫(((((a-b x))^((m-1)/2)) (((a+b x))^(((m-1)/2)+n)))/(x^(m+n)))dx,x,Cos[c+d x]]

Program code:

Int[cot[c_.+d_.*x_]^m_.*(a_+b_.*csc[c_.+d_.*x_])^n_.,x_Symbol] :=
  1/(a^(m-n-1)*b^n*d)*Subst[Int[(a-b*x)^((m-1)/2)*(a+b*x)^((m-1)/2+n)/x^(m+n),x],x,Sin[c+d*x]] /;
FreeQ[{a,b,c,d},x] && IntegerQ[(m-1)/2] && EqQ[a^2-b^2,0] && IntegerQ[n]

2:  ∫((Tan[c+d x])^m)(((a+b Sec[c+d x]))^n)dx  when  ((m+1)/2)∈ℤ ∧ (a^2)-(b^2)==0 ∧ n∉ℤ

Derivation: Integration by substitution

Basis: If ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)==0, then ((Tan[c+d x])^m)==(1/(d (b^(m-1))))Subst[(((((-a+b x))^((m-1)/2))(((a+b x))^((m-1)/2)))/x),x,Sec[c+d x]] (∂_x)Sec[c+d x]

Rule: If ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)==0, then

∫((Tan[c+d x])^m)(((a+b Sec[c+d x]))^n)dx  ⟶  (1/(d (b^(m-1)))) Subst[∫(((((-a+b x))^((m-1)/2))(((a+b x))^(((m-1)/2)+n)))/x)dx,x,Sec[c+d x]]

Program code:

Int[cot[c_.+d_.*x_]^m_.*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  -1/(d*b^(m-1))*Subst[Int[(-a+b*x)^((m-1)/2)*(a+b*x)^((m-1)/2+n)/x,x],x,Csc[c+d*x]] /;
FreeQ[{a,b,c,d,n},x] && IntegerQ[(m-1)/2] && EqQ[a^2-b^2,0] && Not[IntegerQ[n]]

2.  ∫(((e Tan[c+d x]))^m) (a+b Sec[c+d x])dx

1:  ∫(((e Tan[c+d x]))^m) (a+b Sec[c+d x])dx  when  m>1

Rule: If  m>1, then

∫(((e Tan[c+d x]))^m) (a+b Sec[c+d x])dx  ⟶  
((e (((e Tan[c+d x]))^(m-1)) (a m+b (m-1) Sec[c+d x]))/(d m (m-1)))-((e^2)/m) ∫(((e Tan[c+d x]))^(m-2)) (a m+b (m-1) Sec[c+d x])dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_*(a_+b_.*csc[c_.+d_.*x_]),x_Symbol] :=
  -e*(e*Cot[c+d*x])^(m-1)*(a*m+b*(m-1)*Csc[c+d*x])/(d*m*(m-1)) - 
  e^2/m*Int[(e*Cot[c+d*x])^(m-2)*(a*m+b*(m-1)*Csc[c+d*x]),x] /;
FreeQ[{a,b,c,d,e},x] && GtQ[m,1]

2:  ∫(((e Tan[c+d x]))^m) (a+b Sec[c+d x])dx  when  m<-1

Rule: If  m<-1, then

∫(((e Tan[c+d x]))^m) (a+b Sec[c+d x])dx  ⟶  
(((((e Tan[c+d x]))^(m+1)) (a+b Sec[c+d x]))/(d e (m+1) ))-(1/((e^2) (m+1)))∫(((e Tan[c+d x]))^(m+2)) (a (m+1)+b (m+2) Sec[c+d x])dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_*(a_+b_.*csc[c_.+d_.*x_]),x_Symbol] :=
  -(e*Cot[c+d*x])^(m+1)*(a+b*Csc[c+d*x])/(d*e*(m+1)) - 
  1/(e^2*(m+1))*Int[(e*Cot[c+d*x])^(m+2)*(a*(m+1)+b*(m+2)*Csc[c+d*x]),x] /;
FreeQ[{a,b,c,d,e},x] && LtQ[m,-1]

3:  ∫((a+b Sec[c+d x])/(Tan[c+d x]))dx

Derivation: Algebraic simplification

Basis: ((a+b Sec[z])/(Tan[z]))==((b+a Cos[z])/(Sin[z]))

Rule:

∫((a+b Sec[c+d x])/(Tan[c+d x]))dx  ⟶  ∫((b+a Cos[c+d x])/(Sin[c+d x]))dx

Program code:

Int[(a_+b_.*csc[c_.+d_.*x_])/cot[c_.+d_.*x_],x_Symbol] :=
  Int[(b+a*Sin[c+d*x])/Cos[c+d*x],x] /;
FreeQ[{a,b,c,d},x]

4:  ∫(((e Tan[c+d x]))^m) (a+b Sec[c+d x])dx

Derivation: Algebraic expansion

Rule:

∫(((e Tan[c+d x]))^m) (a+b Sec[c+d x])dx  ⟶  a∫(((e Tan[c+d x]))^m)dx+b∫(((e Tan[c+d x]))^m) Sec[c+d x]dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_.*(a_+b_.*csc[c_.+d_.*x_]),x_Symbol] :=
  a*Int[(e*Cot[c+d*x])^m,x] + b*Int[(e*Cot[c+d*x])^m*Csc[c+d*x],x] /;
FreeQ[{a,b,c,d,e,m},x]

3:  ∫((Tan[c+d x])^m)(((a+b Sec[c+d x]))^n)dx  when  ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)≠0

Derivation: Integration by substitution

Basis: If ((m-1)/2)∈ℤ, then ((Tan[c+d x])^m)==((((-1))^((m-1)/2))/(d (b^(m-1))))Subst[(((((b^2)-(x^2)))^((m-1)/2))/x),x,b Sec[c+d x]] (∂_x)(b Sec[c+d x])

Rule: If  ((m-1)/2)∈ℤ ∧ (a^2)-(b^2)≠0, then

∫((Tan[c+d x])^m)(((a+b Sec[c+d x]))^n)dx  ⟶  ((((-1))^((m-1)/2))/(d (b^(m-1))))Subst[∫((((((b^2)-(x^2)))^((m-1)/2))(((a+x))^n))/x)dx,x,b Sec[c+d x]]

Program code:

Int[cot[c_.+d_.*x_]^m_.*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  -(-1)^((m-1)/2)/(d*b^(m-1))*Subst[Int[(b^2-x^2)^((m-1)/2)*(a+x)^n/x,x],x,b*Csc[c+d*x]] /;
FreeQ[{a,b,c,d,n},x] && IntegerQ[(m-1)/2] && NeQ[a^2-b^2,0]

4:  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  when  n∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  n∈(SuperPlus[ℤ]), then

∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ∫(((e Tan[c+d x]))^m) ExpandIntegrand[(((a+b Sec[c+d x]))^n),x]dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  Int[ExpandIntegrand[(e*Cot[c+d*x])^m,(a+b*Csc[c+d*x])^n,x],x] /;
FreeQ[{a,b,c,d,e,m},x] && IGtQ[n,0]

5.  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)==0

1:  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)==0 ∧ (m/2)∈ℤ ∧ n-(1/2)∈ℤ

Derivation: Integration by substitution

Basis: If (a^2)-(b^2)==0 ∧ (m/2)∈ℤ ∧ n-(1/2)∈ℤ, then ((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)==((2 (a^((m/2)+n+(1/2))))/d) Subst[(((x^m) (((2+a (x^2)))^((m/2)+n-(1/2))))/((1+a (x^2)))),x,((Tan[c+d x])/(Sqrt[a+b Sec[c+d x]]))](∂_x)((Tan[c+d x])/(Sqrt[a+b Sec[c+d x]]))

Rule: If (a^2)-(b^2)==0 ∧ (m/2)∈ℤ ∧ n-(1/2)∈ℤ, then

∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ((2 (a^((m/2)+n+(1/2))))/d) Subst[∫(((x^m) (((2+a (x^2)))^((m/2)+n-(1/2))))/((1+a (x^2))))dx,x,((Tan[c+d x])/(Sqrt[a+b Sec[c+d x]]))]

Program code:

Int[cot[c_.+d_.*x_]^m_.*(a_+b_.*csc[c_.+d_.*x_])^n_.,x_Symbol] :=
  -2*a^(m/2+n+1/2)/d*Subst[Int[x^m*(2+a*x^2)^(m/2+n-1/2)/(1+a*x^2),x],x,Cot[c+d*x]/Sqrt[a+b*Csc[c+d*x]]] /;
FreeQ[{a,b,c,d},x] && EqQ[a^2-b^2,0] && IntegerQ[m/2] && IntegerQ[n-1/2]

2:  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)==0 ∧ n∈(SuperMinus[ℤ])

Derivation: Algebraic simplification

Basis: If  (a^2)-(b^2)==0, then a+b Sec[z]==(a^2) (e^(-2))(((e Tan[z]))^2)(((-a+b Sec[z]))^(-1))

Rule: If  (a^2)-(b^2)==0 ∧ n∈(SuperMinus[ℤ]), then

∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  ⟶  (a^(2n)) (e^(-2n))∫(((e Tan[c+d x]))^(m+2 n))(((-a+b Sec[c+d x]))^(-n))dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  a^(2*n)*e^(-2*n)*Int[(e*Cot[c+d*x])^(m+2*n)/(-a+b*Csc[c+d*x])^n,x] /;
FreeQ[{a,b,c,d,e,m},x] && EqQ[a^2-b^2,0] && ILtQ[n,0]

3:  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  when (a^2)-(b^2)==0 ∧ n∉ℤ

Rule: If  (a^2)-(b^2)==0, then

∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  ⟶  
(((2^(m+n+1)) (((e Tan[c+d x]))^(m+1))(((a+b Sec[c+d x]))^n))/(d e(m+1))) ((((a/(a+b Sec[c+d x]))))^(m+n+1)) AppellF1[((m+1)/2),m+n,1,((m+3)/2),-((a-b Sec[c+d x])/(a+b Sec[c+d x])),((a-b Sec[c+d x])/(a+b Sec[c+d x]))]

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  -2^(m+n+1)*(e*Cot[c+d*x])^(m+1)*(a+b*Csc[c+d*x])^n/(d*e*(m+1))*(a/(a+b*Csc[c+d*x]))^(m+n+1)*
    AppellF1[(m+1)/2,m+n,1,(m+3)/2,-(a-b*Csc[c+d*x])/(a+b*Csc[c+d*x]),(a-b*Csc[c+d*x])/(a+b*Csc[c+d*x])] /;
FreeQ[{a,b,c,d,e,m,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[n]]

6.  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)≠0

1.  ∫((((e Tan[c+d x]))^m)/(a+b Sec[c+d x]))dx  when (a^2)-(b^2)≠0 ∧ m-(1/2)∈ℤ

1.  ∫((((e Tan[c+d x]))^m)/(a+b Sec[c+d x]))dx  when (a^2)-(b^2)≠0 ∧ m+(1/2)∈(SuperPlus[ℤ])

1:  ∫((Sqrt[e Tan[c+d x]])/(a+b Sec[c+d x]))dx  when (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (1/(a+b Sec[z]))==(1/a)-(b/(a (b+a Cos[z])))

Rule: If  (a^2)-(b^2)≠0, then

∫((Sqrt[e Tan[c+d x]])/(a+b Sec[c+d x]))dx  ⟶  (1/a)∫(Sqrt[e Tan[c+d x]])dx-(b/a)∫((Sqrt[e Tan[c+d x]])/(b+a Cos[c+d x]))dx

Program code:

Int[Sqrt[e_.*cot[c_.+d_.*x_]]/(a_+b_.*csc[c_.+d_.*x_]),x_Symbol] :=
  1/a*Int[Sqrt[e*Cot[c+d*x]],x] - b/a*Int[Sqrt[e*Cot[c+d*x]]/(b+a*Sin[c+d*x]),x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[a^2-b^2,0]

2:  ∫((((e Tan[c+d x]))^m)/(a+b Sec[c+d x]))dx  when (a^2)-(b^2)≠0 ∧ m-(1/2)∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Basis: (((Tan[z])^2)/(a+b Sec[z]))==-((a-b Sec[z])/(b^2))+(((a^2)-(b^2))/((b^2) (a+b Sec[z])))

Rule: If  (a^2)-(b^2)≠0 ∧ m-(1/2)∈(SuperPlus[ℤ]), then

∫((((e Tan[c+d x]))^m)/(a+b Sec[c+d x]))dx  ⟶  -((e^2)/(b^2))∫(((e Tan[c+d x]))^(m-2))(a-b Sec[c+d x])dx+(((e^2)((a^2)-(b^2)))/(b^2))∫((((e Tan[c+d x]))^(m-2))/(a+b Sec[c+d x]))dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_/(a_+b_.*csc[c_.+d_.*x_]),x_Symbol] :=
  -e^2/b^2*Int[(e*Cot[c+d*x])^(m-2)*(a-b*Csc[c+d*x]),x] + 
  e^2*(a^2-b^2)/b^2*Int[(e*Cot[c+d*x])^(m-2)/(a+b*Csc[c+d*x]),x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[a^2-b^2,0] && IGtQ[m-1/2,0]

2.  ∫((((e Tan[c+d x]))^m)/(a+b Sec[c+d x]))dx  when (a^2)-(b^2)≠0 ∧ m-(1/2)∈(SuperMinus[ℤ])

1:  ∫(1/((Sqrt[e Tan[c+d x]])(a+b Sec[c+d x])))dx  when (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (1/(a+b Sec[z]))==(1/a)-(b/(a (b+a Cos[z])))

Rule: If  (a^2)-(b^2)≠0, then

∫(1/((Sqrt[e Tan[c+d x]])(a+b Sec[c+d x])))dx  ⟶  (1/a)∫(1/(Sqrt[e Tan[c+d x]]))dx-(b/a)∫(1/((Sqrt[e Tan[c+d x]])(b+a Cos[c+d x])))dx

Program code:

Int[1/(Sqrt[e_.*cot[c_.+d_.*x_]]*(a_+b_.*csc[c_.+d_.*x_])),x_Symbol] :=
  1/a*Int[1/Sqrt[e*Cot[c+d*x]],x] - b/a*Int[1/(Sqrt[e*Cot[c+d*x]]*(b+a*Sin[c+d*x])),x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[a^2-b^2,0]

2:  ∫((((e Tan[c+d x]))^m)/(a+b Sec[c+d x]))dx  when (a^2)-(b^2)≠0 ∧ m+(1/2)∈(SuperMinus[ℤ])

Derivation: Algebraic expansion

Basis: (1/(a+b Sec[z]))==((a-b Sec[z])/((a^2)-(b^2)))+(((b^2)((Tan[z])^2))/(((a^2)-(b^2))(a+b Sec[z])))

Rule: If  (a^2)-(b^2)≠0 ∧ m+(1/2)∈(SuperMinus[ℤ]), then

∫((((e Tan[c+d x]))^m)/(a+b Sec[c+d x]))dx  ⟶  (1/((a^2)-(b^2)))∫(((e Tan[c+d x]))^m)(a-b Sec[c+d x])dx+((b^2)/((e^2)((a^2)-(b^2))))∫((((e Tan[c+d x]))^(m+2))/(a+b Sec[c+d x]))dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_/(a_+b_.*csc[c_.+d_.*x_]),x_Symbol] :=
  1/(a^2-b^2)*Int[(e*Cot[c+d*x])^m*(a-b*Csc[c+d*x]),x] + 
  b^2/(e^2*(a^2-b^2))*Int[(e*Cot[c+d*x])^(m+2)/(a+b*Csc[c+d*x]),x] /;
FreeQ[{a,b,c,d,e},x] && NeQ[a^2-b^2,0] && ILtQ[m+1/2,0]

2.  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ (m/2)∈ℤ

1.  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ (m/2)∈(SuperPlus[ℤ])

1:  ∫((Tan[c+d x])^2) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: ((Tan[z])^2)==-1+((Sec[z])^2)

Rule: If  (a^2)-(b^2)≠0, then

∫((Tan[c+d x])^2) (((a+b Sec[c+d x]))^n)dx  ⟶  ∫(-1+((Sec[c+d x])^2)) (((a+b Sec[c+d x]))^n)dx

Program code:

Int[cot[c_.+d_.*x_]^2*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  Int[(-1+Csc[c+d*x]^2)*(a+b*Csc[c+d*x])^n,x] /;
FreeQ[{a,b,c,d,n},x] && NeQ[a^2-b^2,0]

2:  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ (m/2)∈(SuperPlus[ℤ])∧ n-(1/2)∈ℤ

Derivation: Algebraic expansion

Basis: ((Tan[z])^2)==-1+((Sec[z])^2)

Rule: If  (a^2)-(b^2)≠0 ∧ (m/2)∈(SuperPlus[ℤ])∧ n-(1/2)∈ℤ, then

∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ∫(((a+b Sec[c+d x]))^n) ExpandIntegrand[(((-1+((Sec[c+d x])^2)))^(m/2)),x]dx

Program code:

Int[cot[c_.+d_.*x_]^m_*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  Int[ExpandIntegrand[(a+b*Csc[c+d*x])^n,(-1+Csc[c+d*x]^2)^(m/2),x],x] /;
FreeQ[{a,b,c,d,n},x] && NeQ[a^2-b^2,0] && IGtQ[m/2,0] && IntegerQ[n-1/2]

2:  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when (a^2)-(b^2)≠0 ∧ (m/2)∈(SuperMinus[ℤ])∧ n-(1/2)∈ℤ

Derivation: Algebraic expansion

Basis: If (m/2)∈ℤ, then ((Tan[z])^m)==(((-1+((Csc[z])^2)))^(-m/2))

Note: Note need find rules so restriction limiting m equal 2 can be lifted.

Rule: If  (a^2)-(b^2)≠0 ∧ (m/2)∈(SuperMinus[ℤ])∧ n-(1/2)∈ℤ, then

∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ∫(((a+b Sec[c+d x]))^n) ExpandIntegrand[(((-1+((Csc[c+d x])^2)))^(-m/2)),x]dx

Program code:

Int[cot[c_.+d_.*x_]^m_*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  Int[ExpandIntegrand[(a+b*Csc[c+d*x])^n,(-1+Sec[c+d*x]^2)^(-m/2),x],x] /;
FreeQ[{a,b,c,d,n},x] && NeQ[a^2-b^2,0] && ILtQ[m/2,0] && IntegerQ[n-1/2] && EqQ[m,-2]

3:  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  (a^2)-(b^2)≠0 ∧ n∈(SuperPlus[ℤ]), then

∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ∫(((e Tan[c+d x]))^m) ExpandIntegrand[(((a+b Sec[c+d x]))^n),x]dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  Int[ExpandIntegrand[(e*Cot[c+d*x])^m,(a+b*Csc[c+d*x])^n,x],x] /;
FreeQ[{a,b,c,d,e,m},x] && NeQ[a^2-b^2,0] && IGtQ[n,0]

4:  ∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  when  (a^2)-(b^2)≠0 ∧ n∈ℤ ∧ m∈ℤ ∧ ((m/2)∈ℤ ∨ m≤1)

Derivation: Algebraic normalization

Basis: a+b Sec[z]==((b+a Cos[z])/(Cos[z]))

Basis: Tan[z]==((Sin[z])/(Cos[z]))

Rule: If  (a^2)-(b^2)≠0 ∧ n∈ℤ ∧ m∈ℤ ∧ ((m/2)∈ℤ ∨ m≤1), then

∫((Tan[c+d x])^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ∫((((Sin[c+d x])^m) (((b+a Cos[c+d x]))^n))/((Cos[c+d x])^(m+n)))dx

Program code:

Int[cot[c_.+d_.*x_]^m_.*(a_+b_.*csc[c_.+d_.*x_])^n_,x_Symbol] :=
  Int[Cos[c+d*x]^m*(b+a*Sin[c+d*x])^n/Sin[c+d*x]^(m+n),x] /;
FreeQ[{a,b,c,d},x] && NeQ[a^2-b^2,0] && IntegerQ[n] && IntegerQ[m] && (IntegerQ[m/2] || LeQ[m,1])

U:  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx

Rule:

∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ∫(((e Tan[c+d x]))^m) (((a+b Sec[c+d x]))^n)dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_.*(a_.+b_.*csc[c_.+d_.*x_])^n_.,x_Symbol] :=
  Unintegrable[(e*Cot[c+d*x])^m*(a+b*Csc[c+d*x])^n,x] /;
FreeQ[{a,b,c,d,e,m,n},x]

Rules for integrands of the form (((d ((Tan[e+f x])^p)))^n) (((a+b Sec[e+f x]))^m)

1:  ∫(((e ((Tan[c+d x])^p)))^m) (((a+b Sec[c+d x]))^n)dx  when m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((e ((Tan[c+d x])^p)))^m)/(((e Tan[c+d x]))^(m p)))==0

Rule: If  m∉ℤ, then

∫(((e ((Tan[c+d x])^p)))^m) (((a+b Sec[c+d x]))^n)dx  ⟶  ((((e ((Tan[c+d x])^p)))^m)/(((e Tan[c+d x]))^(m p))) ∫(((e Tan[c+d x]))^(m p)) (((a+b Sec[c+d x]))^n)dx

Program code:

Int[(e_.*cot[c_.+d_.*x_])^m_*(a_+b_.*sec[c_.+d_.*x_])^n_.,x_Symbol] :=
  (e*Cot[c+d*x])^m*Tan[c+d*x]^m*Int[(a+b*Sec[c+d*x])^n/Tan[c+d*x]^m,x] /;
FreeQ[{a,b,c,d,e,m,n},x] && Not[IntegerQ[m]]

Int[(e_.*tan[c_.+d_.*x_]^p_)^m_*(a_+b_.*sec[c_.+d_.*x_])^n_.,x_Symbol] :=
  (e*Tan[c+d*x]^p)^m/(e*Tan[c+d*x])^(m*p)*Int[(e*Tan[c+d*x])^(m*p)*(a+b*Sec[c+d*x])^n,x] /;
FreeQ[{a,b,c,d,e,m,n,p},x] && Not[IntegerQ[m]]

Int[(e_.*cot[c_.+d_.*x_]^p_)^m_*(a_+b_.*csc[c_.+d_.*x_])^n_.,x_Symbol] :=
  (e*Cot[c+d*x]^p)^m/(e*Cot[c+d*x])^(m*p)*Int[(e*Cot[c+d*x])^(m*p)*(a+b*Csc[c+d*x])^n,x] /;
FreeQ[{a,b,c,d,e,m,n,p},x] && Not[IntegerQ[m]]